//
//  File.swift
//  Trans
//
//  Created by zcj on 2025/6/3.
//

import Foundation

@propertyWrapper //将下面的struct 定义为属性包装器
struct ConsoleLog<Value>{
    private var value: Value
        
    init(wrappedValue: Value) {
        self.value = wrappedValue
    }
    
    var wrappedValue: Value {
        get { value }
        set {
            value = newValue
            print("New value is \(newValue)")//打印日志
            
        }
    }
}
